<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"  
      xmlns:h="http://java.sun.com/jsf/html"  
      xmlns:f="http://java.sun.com/jsf/core"  
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:t="http://myfaces.apache.org/tomahawk"
      xmlns:jp="http://www.jenia.org/jsf/popup">  
    <ui:composition template="/templates/layout.xhtml">
        <ui:define name="content">            
            <div class="block">
                <div class="navbar navbar-inner block-header">
                    <div class="muted pull-left"> <t:outputText value="#{courseManageBean.course.courseName}"/></div>
                </div>
                <div class="block-content collapse in">

                    <div class="form-horizontal">
                        <div class="span12">
                            <fieldset>
                                <legend><h:outputText value="Chấm Công"/></legend>
                            </fieldset>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="txtCourseID"><h:outputText value="Mã Lớp Học:"/> </label>
                            <div class="controls">
                                <h:inputText styleClass="span1" id="txtCourseID" disabled="true" value="#{courseTeacherAttendance.courseID}"/>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="txtCourseName"><h:outputText value="Tên Lớp Học:"/> </label>
                            <div class="controls">
                                <h:inputText styleClass="span3" id="txtCourseName" disabled="true" value="#{courseTeacherAttendance.courseName}" />
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="txtTeacherName"><h:outputText value="Tên Giáo Viên:"/> </label>
                            <div class="controls">
                                <h:inputText styleClass="span3" id="txtTeacherName" disabled="true" value="#{courseTeacherAttendance.teacherName}" />
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="txtTeacherName"><h:outputText value="Ngày dạy:"/> </label>
                            <div class="controls">
                                <t:inputText styleClass="datepicker" id="txtDateInput"  value="#{courseTeacherAttendance.dateTo}" >
                                    <f:convertDateTime pattern="MM/dd/yyyy" />
                                </t:inputText>
     
                            </div>
                        </div>

                        <div class="control-group">
                            <label class="control-label" for="txtReason"> <h:outputText value="Ghi chú: "/> <i class="icon-envelope"></i></label>
                            <div class="controls">
                                <t:inputTextarea styleClass="span7" id="txtReason"  value="#{courseTeacherAttendance.note}"/>
                            </div>
                        </div>
                        <div class="form-actions">
                            <t:commandLink styleClass="btn btn-primary" action="#{courseManageBean.addCourseTeacherAttendance}">Save changes</t:commandLink>
                            <button type="reset" class="btn" onclick="window.history.back()">Cancel</button>
                        </div>
                    </div>

                </div>
            </div>

            <script>
                $('.datepicker').datepicker({
                    format: 'dd/mm/yyyy',
                    startDate: '-60d'
                });
            </script>
        </ui:define>
    </ui:composition>        

</html>  